#ifndef BOOKMARKNODE_H
#define BOOKMARKNODE_H

#include <QString>
#include <QList>

class BookmarkNode
{
public:

    enum Type
    {
        Root,
        Folder,
        Bookmark,
        Separator
    };

    BookmarkNode(Type type = Root, BookmarkNode *parent = 0);
    ~BookmarkNode();

    bool operator==(const BookmarkNode &other);

    Type type() const;
    void setType(Type type);

    QList<BookmarkNode *> children() const;
    BookmarkNode *parent() const;

    void add(BookmarkNode *child, int offset = -1);
    void remove(BookmarkNode *child);

    QString url;
    QString title;
    QString desc;
    QString tags;
    bool expanded;

private:
    BookmarkNode *m_parent;
    Type m_type;
    QList<BookmarkNode *> m_children;
};

#endif // BOOKMARKNODE_H
